[%--
  Copyright � 2005 Obeo.
  All rights reserved.   This program and the accompanying materials
  are made available under the terms of the GNU Public License v2.0 or any later version
  which accompanies this distribution, and is available at
  http://www.gnu.org/licenses/gpl.txt
--%]
[%
metamodel http://www.obeo.fr/acceleo/uml14

import org.acceleo.modules.uml14.services.Uml14Services
import org.acceleo.modules.uml14.services.StringServices
%]

[%script type="Class" name="fullFilePath"%]
[%if (hasStereotype("Screen")){%]
[%namespace.name%]/[%name%].jsp
[%}%]

[%script type="Class" name="generate" file="[%fullFilePath%]"%]
<html>
	<head>
		<title>[%comment.body%]</title>
	</head>
	<body>

	<form action="<%=request.getContextPath()%>/[%name.toLowerCase()%]/" method="POST">
	
		<input type="hidden" name="event" value=""/>
		
		<table>
		[%for (feature.filter("Attribute")){%]
			<tr>
				<td>[%name%][%if (comment.body.length() > 0){%]([%comment.body%])[%}%] :</td>
				<td><input type="text" name="[%name.firstLower()%]"/></td>
			</tr>
			[%}%]
		[%for (feature.filter("BehavioralFeature")){%]
			<tr>
				<td>
					<input type="submit" name="[%name.firstLower()%]" value="[%name.firstLower()%]" onclick="bCancel=false;[%owner.name%]Form.event.value = '[%name.firstLower()%]';"/>
				</td>
			</tr>
		[%}%]
		</table>
		
		<p> Direct links to other screens :</p>
		<ul>
		[%for (association.inverseAssociationEnd()){%]	
			<li><a href="<%=request.getContextPath()%>/[%participant.name.toLowerCase()%]/"><i>[%participant.name%]</i> : [%comment.body%]</a></li>
		[%}%]
		</ul>
	
	</form>

</body>
[%script type="Class" name="ihmPackage"%]
org.acceleo.sample.ihm 